/*
 * @Description: 
 * @Author: Sang Hao
 * @Date: 2021-09-15 17:11:42
 * @LastEditTime: 2021-10-27 13:37:19
 * @LastEditors: Sang Hao
 */

#ifndef LIDAR_SLAM_SUBSCRIBER_KEY_FRAMES_SUBSCRIBER_HPP_
#define LIDAR_SLAM_SUBSCRIBER_KEY_FRAMES_SUBSCRIBER_HPP_

#include <deque>
#include <ros/ros.h>
#include <nav_msgs/Path.h>

#include "lidar_slam/sensor_data/key_frame.hpp"

namespace lidar_slam {
class KeyFramesSubscriber {
private:
	ros::NodeHandle nh_;
	ros::Subscriber subscriber_;
	/* new_key_frames_接收订阅的数据 */
	std::deque<KeyFrame> new_key_frames_;
private:
	void msg_callback(const nav_msgs::Path::ConstPtr& key_frames_msg_ptr);
public:
	KeyFramesSubscriber(ros::NodeHandle& nh, std::string topic_name, size_t buff_size);
	KeyFramesSubscriber() = default;
	void ParseData(std::deque<KeyFrame>& deque_key_frames);
};
}

#endif